/*
 * search_packet.h
 *
 *  Created on: 23.06.2013
 *      Author: SpirTanol
 */

#ifndef SEARCH_PACKET_H_
#define SEARCH_PACKET_H_

#include "packets/data_packet.h"
#include "global.h"

class SearchPacket : public DataPacket
{
	enum Reg
	{
		R_SCALE,
		R_CUR_MIN,
		R_CUR_MAX,
		R_VER,
	};

	ushort oData[4];

public:
	SearchPacket();
	SearchPacket(const SearchPacket *rhv);
	~SearchPacket() {}

	inline int scale() const { return int(oData[R_SCALE]); }
	inline int curMin() const { return int(oData[R_CUR_MIN]); }
	inline int curMax() const { return int(oData[R_CUR_MAX]); }
	inline int version() const { return int(oData[R_VER]); }

	SearchPacket *clone() const { return new SearchPacket(this); } // [virtual]

private:
	void init();

};

#endif /* SEARCH_PACKET_H_ */
